import turtle

# 设置画布和画笔
screen = turtle.Screen()
pen = turtle.Turtle()
pen.speed(2)
pen.pensize(5)

# 绘制数字 5
pen.penup()
pen.goto(100, 100)
pen.pendown()

# 绘制横
pen.backward(100)

# 绘制竖
pen.right(90)
pen.forward(100)

# 绘制横
pen.right(90)
pen.backward(100)

# 绘制竖
pen.right(-90)
pen.forward(100)

# 绘制横
pen.right(-90)
pen.backward(100)

# 隐藏画笔

pen.hideturtle()

# 保持窗口打开
screen.mainloop()